using System;

namespace Needle.Bus.Engine
{
    [Serializable]
    public class UnknownAddressException : Exception
    {
        public UnknownAddressException(string address)
            : base(String.Format("Unknown address '{0}'", address))
        { _address = address; }
        public UnknownAddressException(string address, Exception inner)
            : base(String.Format("Unknown address '{0}'", address), inner)
        { _address = address; }
        protected UnknownAddressException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }

        private string _address;
        public string Address
        {
            get { return _address; }
        }
    }
}
